#[inline(always)]
pub unsafe fn hlt() {
    asm!("hlt"::::"volatile");
}

#[inline(always)]
pub unsafe fn outb(port: u16, data: u8) {
    asm!("outb $0, $1"::"{al}"(data), "{dx}"(port)::"volatile");
}

#[inline(always)]
pub unsafe fn inb(port: u16) -> u8 {
    let mut data: u8;
    asm!("inb $1, $0":"={al}"(data):"{dx}"(port)::"volatile");
    data
}

#[inline(always)]
pub unsafe fn lidtq(pidtptr: u64) {
    asm!("lidtq ($0)"::"r"(pidtptr)::"volatile");
}
